<template>
  <div class="copyright" v-if="bei.aq || bei.ga">
    <p>
      <a v-if="bei.aq" href="https://beian.miit.gov.cn/" target="_blank">备案号：{{bei.aq}}</a>
      <a v-if="bei.ga" :href="'http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=' + bei.ga" target="_blank">
        <img src="../../assets/images/bei.png" />
        公网备案号{{bei.ga}}
      </a>
    </p>
  </div>
</template>

<script>
export default {
  name: 'Copyright',
  data() {
    return {
      bei: {
        aq: '',
        ga: ''
      }
    }
  },
  mounted() {
    this.getBei()
  },
  methods: {
    getBei() {
      this.$get('bei')
        .then((res) => {
          this.bei = res.data.data
        })
    }
  }
}
</script>

<style scoped lang="scss">
$font-size:14px;
$font-color:#666;
.copyright{
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 55px;
  background: rgba(255,255,255,.6);
  text-align: center;
  font-size: $font-size;
  color: $font-color;
  p{
    margin: 0;
    height: 100%;
    line-height: 55px;
    a{
     margin-right: 10px;
     img{
       position: relative;
       top:2px;
     }
    }
  }
}
</style>
